﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:model="clr-namespace:Projecturo.Model;assembly=Projecturo.Model">

    <DataTemplate DataType="{x:Type model:TicketState}">
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
            <Border BorderThickness="0" CornerRadius="3" Width="12" Height="12" Background="{Binding Color}"/> 
            <TextBlock Text="{Binding Name}"/>
        </StackPanel>    
    </DataTemplate>
    
    <LinearGradientBrush x:Key="Brush_HeaderBackground" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#ccc" Offset="0" />
        <GradientStop Color="#999" Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_ButtonBackground" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#ccc" Offset="0" />
        <GradientStop Color="#999" Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="Brush_ButtonBackgroundPressed" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#999" Offset="0" />
        <GradientStop Color="#ccc" Offset="1" />
    </LinearGradientBrush>

    <DataTemplate x:Key="HeaderTemplate_TopHeader">
        <Border SnapsToDevicePixels="True" Margin="4,4,4,4" BorderBrush="#FFD3D3D3" BorderThickness="0,0,0,0" CornerRadius="0,0,0,0" Padding="4,4,4,4">
            <StackPanel>
                <Image HorizontalAlignment="Left" Source="Images/ProjecturoLogo.png" Width="125"/>
                <TextBlock VerticalAlignment="Center" FontStyle="Italic" FontSize="12" Foreground="#FF717171" Text="{TemplateBinding Content}"/>
            </StackPanel>
        </Border>
    </DataTemplate>
    
    <DataTemplate x:Key="HeaderTemplate_Default">
        <Border SnapsToDevicePixels="True" Margin="4,4,4,4" BorderBrush="#FFD3D3D3" BorderThickness="0,0,0,0" CornerRadius="0,0,0,0" Padding="4,4,4,4">
            <StackPanel Orientation="Horizontal">
                <TextBlock HorizontalAlignment="Center" FontSize="16" FontStyle="Italic" FontWeight="Bold" Foreground="#0668C3" Text="{TemplateBinding Content}"/>
            </StackPanel>
        </Border>
    </DataTemplate>

    <Style TargetType="{x:Type Button}" x:Key="TabItemButton">
        <Setter Property="Margin" Value="2"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="Foreground" Value="#FFB4C9FB"/>
        <Setter Property="BorderBrush" Value="#FF1A2E5E"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
                    <GradientBrush.GradientStops>
                        <GradientStop Color="#FF3D4D73" Offset="0.625"/>
                        <GradientStop Color="#FF6988D3" Offset="0.116"/>
                    </GradientBrush.GradientStops>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="ButtonBorder" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}"  BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <DockPanel LastChildFill="True">
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="1"/>
                        </DockPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="ButtonBorder" Property="Background">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
                                        <GradientBrush.GradientStops>
                                            <GradientStop Color="#FF6988D3" Offset="0.625"/>
                                            <GradientStop Color="#FF3D4D73" Offset="0.116"/>
                                        </GradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="ButtonBorder" Property="Background">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
                                        <GradientBrush.GradientStops>
                                            <GradientStop Color="#FF3D4D73" Offset="0.100"/>
                                            <GradientStop Color="#FF6988D3" Offset="0.500"/>
                                            <GradientStop Color="#FF3D4D73" Offset="0.100"/>
                                        </GradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="ButtonBorder" Property="Background">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
                                        <GradientBrush.GradientStops>
                                            <GradientStop Color="#cccccc" Offset="0.625"/>
                                            <GradientStop Color="#999999" Offset="0.116"/>
                                        </GradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Foreground" Value="#000000"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style TargetType="{x:Type Button}">
        <Setter Property="Margin" Value="2"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="Foreground" Value="#FFB4C9FB"/>
        <Setter Property="BorderBrush" Value="#FF1A2E5E"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
                    <GradientBrush.GradientStops>
                        <GradientStop Color="#FF3D4D73" Offset="0.625"/>
                        <GradientStop Color="#FF6988D3" Offset="0.116"/>
                    </GradientBrush.GradientStops>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="ButtonBorder" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}"  BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <DockPanel LastChildFill="True">
                            <Rectangle Fill="#FF1A2E5E" Width="3" DockPanel.Dock="Left"/>
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="1"/>
                        </DockPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="ButtonBorder" Property="Background">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
                                        <GradientBrush.GradientStops>
                                            <GradientStop Color="#FF6988D3" Offset="0.625"/>
                                            <GradientStop Color="#FF3D4D73" Offset="0.116"/>
                                        </GradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="ButtonBorder" Property="Background">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
                                        <GradientBrush.GradientStops>
                                            <GradientStop Color="#FF3D4D73" Offset="0.100"/>
                                            <GradientStop Color="#FF6988D3" Offset="0.500"/>
                                            <GradientStop Color="#FF3D4D73" Offset="0.100"/>
                                        </GradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="ButtonBorder" Property="Background">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
                                        <GradientBrush.GradientStops>
                                            <GradientStop Color="#cccccc" Offset="0.625"/>
                                            <GradientStop Color="#999999" Offset="0.116"/>
                                        </GradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Foreground" Value="#000000"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--<Style TargetType="{x:Type Button}">
        <Setter Property="Margin" Value="2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="ButtonBorder" BorderBrush="Black" BorderThickness="1" CornerRadius="5" Background="{StaticResource Brush_ButtonBackground}">
                        <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" TargetName="ButtonBorder" Value="{StaticResource Brush_ButtonBackgroundPressed}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="BorderBrush" TargetName="ButtonBorder" Value="Gainsboro"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="BorderBrush" TargetName="ButtonBorder"  Value="Gray"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>

        </Style.Triggers>
    </Style>-->

    <Style TargetType="{x:Type TextBlock}">
        <Setter Property="Margin" Value="2"/>
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>

    <Style TargetType="{x:Type TextBox}">
        <Setter Property="Margin" Value="2"/>
        <Setter Property="BorderBrush" Value="#FF1A2E5E"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background" Value="White"/>
        <Setter Property="MinHeight" Value="20"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBoxBase}">
                    <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
                        <DockPanel LastChildFill="True">
                            <Rectangle Fill="#FF1A2E5E" Width="3" DockPanel.Dock="Left"/>
                            <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
                        </DockPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <Style.Triggers>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="Background" Value="#FFB4C9FB"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Background" Value="#cccccc"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <!--<Style TargetType="{x:Type TextBox}">
        <Setter Property="Margin" Value="2"/>
        <Setter Property="BorderBrush" Value="DarkGray"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Style.Triggers>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="Background" Value="Gainsboro"/>
            </Trigger>
        </Style.Triggers>
    </Style>-->

    <Style TargetType="{x:Type PasswordBox}">
        <Setter Property="Margin" Value="2"/>
        <Setter Property="BorderBrush" Value="#FF1A2E5E"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background" Value="White"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="MinHeight" Value="20"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type PasswordBox}">
                    <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
                        <DockPanel LastChildFill="True">
                            <Rectangle Fill="#FF1A2E5E" Width="3" DockPanel.Dock="Left"/>
                            <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
                        </DockPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <Style.Triggers>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="Background" Value="#FFB4C9FB"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Background" Value="#cccccc"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    
    <!--<Style TargetType="{x:Type PasswordBox}">
        <Setter Property="Margin" Value="2"/>
        <Setter Property="BorderBrush" Value="DarkGray"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Style.Triggers>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="Background" Value="Gainsboro"/>
            </Trigger>
        </Style.Triggers>
    </Style>-->

    <Style x:Key="MainHCCStyle" TargetType="{x:Type HeaderedContentControl}">
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Border 
                        Background="{StaticResource Brush_HeaderBackground}" 
                        BorderBrush="LightGray" 
                        BorderThickness="1" 
                        CornerRadius="5" 
                        Margin="4" 
                        Padding="4" 
                        SnapsToDevicePixels="True" 
                        >
                        <TextBlock 
                          FontSize="14"
                          FontWeight="Bold"
                          Foreground="White" 
                          HorizontalAlignment="Center"  
                          Text="{TemplateBinding Content}" 
                          />
                    </Border>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type HeaderedContentControl}">
                    <DockPanel>
                        <ContentPresenter 
                          DockPanel.Dock="Top"
                          ContentSource="Header" 
                          ContentTemplate="{TemplateBinding HeaderTemplate}" 
                          />
                        <ContentPresenter 
                          ContentSource="Content" 
                          ContentTemplate="{TemplateBinding ContentTemplate}" 
                          />
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SubHCCStyle" TargetType="{x:Type HeaderedContentControl}">
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Border 
                        Background="{StaticResource Brush_HeaderBackground}" 
                        BorderBrush="LightGray" 
                        BorderThickness="1" 
                        CornerRadius="5"  
                        SnapsToDevicePixels="True" 
                        >
                        <TextBlock 
                          FontSize="14"
                          FontWeight="Bold"
                          Foreground="White" 
                          HorizontalAlignment="Center"  
                          Text="{TemplateBinding Content}" 
                          />
                    </Border>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type HeaderedContentControl}">
                    <DockPanel>
                        <ContentPresenter 
                          DockPanel.Dock="Top"
                          ContentSource="Header" 
                          ContentTemplate="{TemplateBinding HeaderTemplate}" 
                          />
                        <ContentPresenter 
                          ContentSource="Content" 
                          ContentTemplate="{TemplateBinding ContentTemplate}" 
                          />
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MainBorderStyle" TargetType="{x:Type Border}">
        <Setter Property="BorderBrush" Value="LightGray" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="CornerRadius" Value="0" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
    </Style>

    <DataTemplate x:Key="ClosableTabItemTemplate">
        <DockPanel Width="120">
            <Button 
                Command="{Binding Path=CloseCommand}"
                Style="{StaticResource TabItemButton}"
                Content="X"
                Cursor="Hand"
                DockPanel.Dock="Right"
                Focusable="False"
                FontFamily="Courier" 
                FontSize="9"
                FontWeight="Bold"  
                Foreground="Gainsboro"
                Margin="0,1,0,0"
                Padding="0"
                VerticalContentAlignment="Bottom"
                Width="16" Height="16" 
                />
            <ContentPresenter 
                Content="{Binding Path=DisplayName}" 
                VerticalAlignment="Center" 
                />
        </DockPanel>
    </DataTemplate>

    <DataTemplate x:Key="WorkspacesTemplate">
        <TabControl 
      IsSynchronizedWithCurrentItem="True" 
      ItemsSource="{Binding}" 
      ItemTemplate="{StaticResource ClosableTabItemTemplate}"
      Margin="4"
      />
    </DataTemplate>

    <!--ComboBox-->

    <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="20" />
            </Grid.ColumnDefinitions>
            <Border
		      x:Name="Border" 
		      Grid.ColumnSpan="2"
		      CornerRadius="0"
		      Background="White"
		      BorderBrush="#FF1A2E5E"
		      BorderThickness="1" />
            <Border 
		      Grid.Column="0"
		      CornerRadius="0" 
		      Margin="1" 
		      Background="#ffffff" 
		      BorderThickness="0" />
            <Path 
		      x:Name="Arrow"
		      Grid.Column="1"     
		      Fill="Black"
		      HorizontalAlignment="Center"
		      VerticalAlignment="Center"
		      Data="M 0 0 L 4 4 L 8 0 Z"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="ToggleButton.IsMouseOver" Value="true">
                <Setter TargetName="Border" Property="Background" Value="#FF1A2E5E" />
                <Setter TargetName="Arrow" Property="Fill" Value="White"/>
            </Trigger>
            <Trigger Property="ToggleButton.IsChecked" Value="true">
                <Setter TargetName="Border" Property="Background" Value="#FF91A3CF" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Border" Property="Background" Value="#EEEEEE" />
                <Setter TargetName="Border" Property="BorderBrush" Value="#AAAAAA" />
                <Setter Property="Foreground" Value="#888888"/>
                <Setter TargetName="Arrow" Property="Fill" Value="#888888" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="ComboBoxTextBox" TargetType="{x:Type TextBox}">
        <Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}" />
    </ControlTemplate>

    <Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
        <Setter Property="Margin" Value="2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBox}">
                    <Grid>
                        <ToggleButton 
		            Name="ToggleButton" 
		            Template="{StaticResource ComboBoxToggleButton}" 
		            Grid.Column="2" 
		            Focusable="false"
		            IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
		            ClickMode="Press">
                        </ToggleButton>
                        <ContentPresenter
		            Name="ContentSite"
		            IsHitTestVisible="False" 
		            Content="{TemplateBinding SelectionBoxItem}"
		            ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
		            ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
		            Margin="1,1,23,1"
		            VerticalAlignment="Center"
		            HorizontalAlignment="Left" />
                        <TextBox x:Name="PART_EditableTextBox"
		            Style="{x:Null}" 
		            Template="{StaticResource ComboBoxTextBox}" 
		            HorizontalAlignment="Left" 
		            VerticalAlignment="Center" 
		            Margin="3,3,23,3"
		            Focusable="True" 
		            Background="Transparent"
		            Visibility="Hidden"
		            IsReadOnly="{TemplateBinding IsReadOnly}"/>
                        <Popup 
		            Name="Popup"
		            Placement="Bottom"
		            IsOpen="{TemplateBinding IsDropDownOpen}"
		            AllowsTransparency="True" 
		            Focusable="False"
		            PopupAnimation="Slide">
                            <Grid 
		              Name="DropDown"
		              SnapsToDevicePixels="True"                
		              MinWidth="{TemplateBinding ActualWidth}"
		              MaxHeight="{TemplateBinding MaxDropDownHeight}">
                                <Border 
		                x:Name="DropDownBorder"
		                Background="#FFFFFF"
		                BorderThickness="1"
		                BorderBrush="#888888"/>
                                <ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
                                    <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
                                </ScrollViewer>
                            </Grid>
                        </Popup>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasItems" Value="false">
                            <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="#888888"/>
                        </Trigger>
                        <Trigger Property="IsGrouping" Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                        </Trigger>
                        <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="true">
                            <Setter TargetName="DropDownBorder" Property="CornerRadius" Value="4"/>
                            <Setter TargetName="DropDownBorder" Property="Margin" Value="0,2,0,0"/>
                        </Trigger>
                        <Trigger Property="IsEditable"
		               Value="true">
                            <Setter Property="IsTabStop" Value="false"/>
                            <Setter TargetName="PART_EditableTextBox" Property="Visibility"	Value="Visible"/>
                            <Setter TargetName="ContentSite" Property="Visibility" Value="Hidden"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
        </Style.Triggers>
    </Style>

    <Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                    <Border 
		          Name="Border"
		          Padding="0"
		          SnapsToDevicePixels="true">
                        <ContentPresenter />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsHighlighted" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="#FF91A3CF"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="#888888"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>